/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

#app {
    height: 100%;
    width: 100%;
}

/* 内容区域滚动 */
.el-main {
    overflow-y: auto;
    height: 100%;
}

/* 确保容器不会超出视口 */
.home-container {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* 全局变量 */
:root {
    --primary-color: #409EFF;
    --success-color: #67C23A;
    --warning-color: #E6A23C;
    --danger-color: #F56C6C;
    --info-color: #909399;
    --text-color: #303133;
    --border-radius: 4px;
    --box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    --transition-duration: 0.3s;
    --transition-timing: ease;
}

/* 基础样式 */
html, body, #app {
    width: 100%;
    height: 100%;
    font-family: "微软雅黑", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    color: var(--text-color);
}

/* 响应式布局 */
@media screen and (max-width: 1200px) {
    html {
        font-size: 14px;
    }
}

@media screen and (max-width: 992px) {
    html {
        font-size: 13px;
    }
}

@media screen and (max-width: 768px) {
    html {
        font-size: 12px;
    }
}

/* 按钮样式增强 */
.el-button {
    transition: var(--transition);
}

.el-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 输入框样式增强 */
.el-input__inner {
    transition: var(--transition);
}

.el-input__inner:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

/* 卡片容器 */
.card-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin: 10px;
}

/* 动画效果 */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

/* 从下方滑入 */
.slide-up-enter-active,
.slide-up-leave-active {
    transition: all 0.3s ease-out;
}

.slide-up-enter-from {
    opacity: 0;
    transform: translateY(30px);
}

.slide-up-leave-to {
    opacity: 0;
    transform: translateY(-30px);
}

/* 缩放效果 */
.scale-enter-active,
.scale-leave-active {
    transition: all 0.3s ease;
}

.scale-enter-from,
.scale-leave-to {
    opacity: 0;
    transform: scale(0.9);
}

/* 旋转淡入 */
.rotate-fade-enter-active,
.rotate-fade-leave-active {
    transition: all 0.4s ease;
}

.rotate-fade-enter-from,
.rotate-fade-leave-to {
    opacity: 0;
    transform: rotate(-3deg) scale(0.95);
}

/* 3D翻转 */
.flip-enter-active,
.flip-leave-active {
    transition: all 0.4s ease;
    transform-style: preserve-3d;
}

.flip-enter-from {
    opacity: 0;
    transform: rotateY(90deg);
}

.flip-leave-to {
    opacity: 0;
    transform: rotateY(-90deg);
}

/* 防止动画期间出现滚动条 */
.v-enter-active,
.v-leave-active {
    overflow: hidden;
}

/* 布局工具类 */
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

/* 间距工具类 */
.m-1 { margin: 0.5rem; }
.m-2 { margin: 1rem; }
.m-3 { margin: 1.5rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* 响应式容器 */
.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* 背景图片容器样式优化 */
.background-image-container {
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

/* 登录框样式优化 */
.login-container {
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 响应式文本 */
.text-small { font-size: 0.875rem; }
.text-normal { font-size: 1rem; }
.text-large { font-size: 1.25rem; }
.text-xlarge { font-size: 1.5rem; }

/* 文本对齐 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* 阴影效果 */
.shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.shadow { box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 10px 15px rgba(0,0,0,0.1); }

/* 圆角 */
.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: calc(var(--border-radius) * 2); }
.rounded-full { border-radius: 9999px; }

/* 日期选择器全局样式 */
.el-date-editor.el-range-editor {
  display: flex !important;
  align-items: center !important;
}

.el-date-editor .el-range-separator {
  padding: 0 8px !important;
  width: auto !important;
  color: #303133 !important;
  font-size: 14px !important;
  line-height: 32px !important;
}

.el-date-editor .el-range-input {
  width: 42% !important;
}

.el-date-editor .el-range__icon,
.el-date-editor .el-range__close-icon {
  line-height: 32px !important;
}

/* 确保分隔符垂直居中 */
.el-date-editor .el-range-separator {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.el-menu-vertical .el-menu {
  background-color: var(--aside-background) !important;
}


.home-dashboard {
  background-color: var(--card-background) !important;
}

/* 头像组件全局样式 */
.el-avatar {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--primary-color);
  color: #fff;
  transition: all 0.3s ease;
}

.el-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.el-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 确保所有头像都是圆形的 */
.el-avatar,
.el-avatar--circle,
.el-avatar--large,
.el-avatar--medium,
.el-avatar--small {
  border-radius: 50% !important;
}

/* 表格全局样式 */
.el-table {
  width: 100%;
  margin-bottom: 20px;
  /* 设置表格文字居中 */
  --el-table-text-align: center;
}

.el-table th {
  text-align: center !important;
  background-color: var(--table-header-background);
  color: var(--text-color);
  font-weight: 600;
  padding: 12px 0;
}

.el-table td {
  text-align: center !important;
  color: var(--text-color);
  padding: 12px 0;
}

/* 确保表格内的按钮和标签也居中 */
.el-table .cell {
  text-align: center !important;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 活动描述列的特殊处理 */
.el-table td.description-column .cell {
  display: block;  /* 改回块级显示 */
  white-space: nowrap;  /* 不换行 */
  overflow: hidden;  /* 超出隐藏 */
  text-overflow: ellipsis;  /* 显示省略号 */
  max-width: 200px;  /* 设置最大宽度 */
  margin: 0 auto;  /* 保持居中 */
}

/* 表格内的头像居中 */
.el-table .el-avatar {
  margin: 0 auto;
}

/* 确保选择框居中 */
.el-table .el-table-column--selection .cell {
  padding-right: 14px;
  padding-left: 14px;
}

/* 分页组件居中 */
.el-pagination {
  text-align: left;
  margin-top: 20px;
  justify-content: center;
}

/* 弹出框样式美化 */
.el-dialog {
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
}

.el-dialog__header {
  padding: 20px !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--card-background);
}

.el-dialog__title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: var(--text-color) !important;
}

.el-dialog__headerbtn {
  top: 20px !important;
  right: 20px !important;
}

.el-dialog__headerbtn .el-dialog__close {
  font-size: 18px !important;
  color: var(--text-color-secondary) !important;
  transition: all 0.3s ease;
}

.el-dialog__headerbtn:hover .el-dialog__close {
  color: var(--primary-color) !important;
  transform: rotate(90deg);
}

.el-dialog__body {
  padding: 24px !important;
  color: var(--text-color) !important;
  background-color: var(--card-background);
}

.el-dialog__footer {
  padding: 16px 24px !important;
  border-top: 1px solid var(--border-color);
  background-color: var(--card-background);
}

/* Message Box 样式美化 */
.el-message-box {
  border-radius: 12px !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
  padding-bottom: 0 !important;
}

.el-message-box__header {
  padding: 20px !important;
  border-bottom: 1px solid var(--border-color);
}

.el-message-box__title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: var(--text-color) !important;
}

.el-message-box__headerbtn {
  top: 20px !important;
  right: 20px !important;
}

.el-message-box__headerbtn .el-message-box__close {
  font-size: 18px !important;
  color: var(--text-color-secondary) !important;
  transition: all 0.3s ease;
}

.el-message-box__headerbtn:hover .el-message-box__close {
  color: var(--primary-color) !important;
  transform: rotate(90deg);
}

.el-message-box__content {
  padding: 24px !important;
  color: var(--text-color) !important;
}

.el-message-box__container {
  position: relative;
  padding: 0 !important;
}

.el-message-box__status {
  font-size: 24px !important;
  top: 50% !important;
  transform: translateY(-50%);
}

.el-message-box__message {
  padding-left: 36px !important;
  font-size: 15px !important;
}

.el-message-box__btns {
  padding: 16px 24px !important;
  border-top: 1px solid var(--border-color);
}

.el-message-box__btns button:nth-child(2) {
  margin-left: 12px !important;
}

/* Popover 样式美化 */
.el-popover {
  border-radius: 8px !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
  padding: 12px !important;
}

.el-popover__title {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--text-color) !important;
  padding-bottom: 8px !important;
  margin-bottom: 8px !important;
  border-bottom: 1px solid var(--border-color);
}

/* Tooltip 样式美化 */
.el-tooltip__popper {
  border-radius: 4px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}

.el-tooltip__popper.is-dark {
  background: rgba(0, 0, 0, 0.8) !important;
}

.el-tooltip__popper.is-light {
  background: #fff !important;
  border: 1px solid var(--border-color) !important;
}

/* 按钮样式美化 */
.el-button {
  border-radius: 6px !important;
  padding: 10px 20px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
}

.el-button:hover {
  transform: translateY(-1px);
}

/* 主要按钮 */
.el-button--primary {
  background-color: #409EFF !important;
  border-color: #409EFF !important;
  color: #ffffff !important;
}

.el-button--primary:hover,
.el-button--primary:focus {
  background-color: #66b1ff !important;
  border-color: #66b1ff !important;
  color: #ffffff !important;
}

.el-button--primary.is-disabled,
.el-button--primary.is-disabled:hover,
.el-button--primary.is-disabled:focus {
  background-color: #a0cfff !important;
  border-color: #a0cfff !important;
  color: #ffffff !important;
}

/* 默认按钮 */
[data-theme='light'] .el-button--default {
  background-color: #ffffff !important;
  border-color: #dcdfe6 !important;
  color: #606266 !important;
}

[data-theme='light'] .el-button--default:hover,
[data-theme='light'] .el-button--default:focus {
  color: #409EFF !important;
  border-color: #c6e2ff !important;
  background-color: #ecf5ff !important;
}

[data-theme='dark'] .el-button--default {
  background-color: #363636 !important;
  border-color: #4c4c4c !important;
  color: #ffffff !important;
}

[data-theme='dark'] .el-button--default:hover,
[data-theme='dark'] .el-button--default:focus {
  color: #409EFF !important;
  border-color: #409EFF !important;
  background-color: #404040 !important;
}

/* 文本按钮 */
.el-button--text {
  border-color: transparent !important;
  color: var(--primary-color) !important;
  background: transparent !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.el-button--text:hover,
.el-button--text:focus {
  color: var(--primary-hover) !important;
  border-color: transparent !important;
  background-color: transparent !important;
}

/* 禁用状态 */
[data-theme='light'] .el-button.is-disabled,
[data-theme='light'] .el-button.is-disabled:hover,
[data-theme='light'] .el-button.is-disabled:focus {
  color: #c0c4cc !important;
  cursor: not-allowed !important;
  background-color: #fff !important;
  border-color: #ebeef5 !important;
}

[data-theme='dark'] .el-button.is-disabled,
[data-theme='dark'] .el-button.is-disabled:hover,
[data-theme='dark'] .el-button.is-disabled:focus {
  color: #686868 !important;
  cursor: not-allowed !important;
  background-color: #2b2b2b !important;
  border-color: #363636 !important;
}

/* 弹框中的按钮组样式 */
.el-dialog__footer .el-button + .el-button,
.el-message-box__btns .el-button + .el-button {
  margin-left: 12px !important;
}

/* 弹框中的按钮样式 */
[data-theme='light'] .el-dialog__footer,
[data-theme='light'] .el-message-box__btns {
  background-color: #fff !important;
}

[data-theme='dark'] .el-dialog__footer,
[data-theme='dark'] .el-message-box__btns {
  background-color: #363636 !important;
}

/* 弹框中的按钮样式 */
[data-theme='light'] .el-dialog,
[data-theme='light'] .el-message-box {
  background-color: #fff !important;
}

[data-theme='dark'] .el-dialog,
[data-theme='dark'] .el-message-box {
  background-color: #363636 !important;
  border-color: #4c4c4c !important;
}

/* 弹框标题和内容样式 */
[data-theme='light'] .el-dialog__title,
[data-theme='light'] .el-message-box__title {
  color: #303133 !important;
}

[data-theme='dark'] .el-dialog__title,
[data-theme='dark'] .el-message-box__title {
  color: #fff !important;
}

[data-theme='light'] .el-dialog__body,
[data-theme='light'] .el-message-box__content {
  color: #606266 !important;
}

[data-theme='dark'] .el-dialog__body,
[data-theme='dark'] .el-message-box__content {
  color: #c0c4cc !important;
}

/* 弹框关闭按钮样式 */
[data-theme='light'] .el-dialog__headerbtn .el-dialog__close,
[data-theme='light'] .el-message-box__headerbtn .el-message-box__close {
  color: #909399 !important;
}

[data-theme='dark'] .el-dialog__headerbtn .el-dialog__close,
[data-theme='dark'] .el-message-box__headerbtn .el-message-box__close {
  color: #fff !important;
}

/* 小型按钮 */
.el-button--small {
  padding: 8px 15px !important;
  font-size: 13px !important;
}

/* 迷你按钮 */
.el-button--mini {
  padding: 6px 12px !important;
  font-size: 12px !important;
}

/* 圆形按钮 */
.el-button.is-circle {
  padding: 10px !important;
  border-radius: 50% !important;
}

.el-button--small.is-circle {
  padding: 8px !important;
}

.el-button--mini.is-circle {
  padding: 6px !important;
}

/* 表单项在弹出框中的样式 */
.el-dialog .el-form-item {
  margin-bottom: 20px !important;
}

.el-dialog .el-form-item__label {
  font-weight: 500 !important;
  color: var(--text-color) !important;
  padding-right: 16px !important;
}

.el-dialog .el-input__inner {
  border-radius: 6px !important;
  border-color: var(--border-color) !important;
  padding: 0 12px !important;
  height: 36px !important;
  line-height: 36px !important;
  transition: all 0.3s ease !important;
}

.el-dialog .el-input__inner:hover {
  border-color: var(--primary-hover) !important;
}

.el-dialog .el-input__inner:focus {
  border-color: var(--primary-color) !important;
}

/* 弹出框中的表格样式 */
.el-dialog .el-table {
  border-radius: 8px !important;
  overflow: hidden !important;
  margin: 8px 0 !important;
}

.el-dialog .el-table th {
  background-color: var(--table-header-background) !important;
  color: var(--text-color) !important;
  font-weight: 600 !important;
  padding: 12px 8px !important;
}

.el-dialog .el-table td {
  padding: 12px 8px !important;
}

/* 时间选择器样式 */
.el-date-editor.el-input {
  width: 260px !important;
}

.el-date-editor--daterange {
  width: 260px !important;
}

.el-picker-panel {
  background-color: var(--card-background) !important;
  border-color: var(--border-color) !important;
}

[data-theme='light'] .el-picker-panel {
  background-color: #ffffff !important;
  border-color: #e4e7ed !important;
  color: #606266 !important;
}

[data-theme='dark'] .el-picker-panel {
  background-color: #363636 !important;
  border-color: #4c4c4c !important;
  color: #ffffff !important;
}

/* 日期面板头部 */
.el-date-range-picker__header {
  padding: 12px 20px !important;
  margin-bottom: 0 !important;
  text-align: center !important;
  border-bottom: 1px solid var(--border-color) !important;
}

[data-theme='light'] .el-date-range-picker__header {
  color: #606266 !important;
}

[data-theme='dark'] .el-date-range-picker__header {
  color: #ffffff !important;
}

/* 日期单元格 */
.el-date-table td {
  padding: 4px 0 !important;
}

[data-theme='light'] .el-date-table td {
  color: #606266 !important;
}

[data-theme='dark'] .el-date-table td {
  color: #c0c4cc !important;
}

/* 今天单元格 */
.el-date-table td.today {
  color: var(--primary-color) !important;
}

/* 选中的日期 */
.el-date-table td.in-range {
  background-color: var(--hover-color) !important;
}

.el-date-table td.start-date,
.el-date-table td.end-date {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
}

/* 禁用的日期 */
[data-theme='light'] .el-date-table td.disabled {
  color: #c0c4cc !important;
  background-color: #f5f7fa !important;
}

[data-theme='dark'] .el-date-table td.disabled {
  color: #686868 !important;
  background-color: #2b2b2b !important;
}

/* 时间选择器输入框 */
.el-date-editor .el-input__inner {
  height: 36px !important;
  line-height: 36px !important;
  border-radius: 4px !important;
  padding: 0 12px 0 35px !important;
  border-color: var(--border-color) !important;
  background-color: var(--card-background) !important;
  color: var(--text-color) !important;
}

/* 时间选择器图标 */
.el-date-editor .el-input__prefix {
  left: 8px !important;
}

.el-date-editor .el-input__icon {
  line-height: 36px !important;
  color: var(--text-color-secondary) !important;
}

/* 时间范围分隔符 */
.el-date-editor .el-range-separator {
  line-height: 32px !important;
  color: var(--text-color-secondary) !important;
}

/* 面板底部按钮 */
.el-picker-panel__footer {
  padding: 12px 20px !important;
  border-top: 1px solid var(--border-color) !important;
  background-color: var(--card-background) !important;
}

/* 日期选择器悬浮效果 */
.el-date-table td:hover {
  color: var(--primary-color) !important;
}

/* 周标题 */
[data-theme='light'] .el-date-table th {
  color: #909399 !important;
  font-weight: 500 !important;
}

[data-theme='dark'] .el-date-table th {
  color: #c0c4cc !important;
  font-weight: 500 !important;
}

/* 月份按钮 */
.el-date-range-picker__header button {
  color: var(--text-color-secondary) !important;
}

.el-date-range-picker__header button:hover {
  color: var(--primary-color) !important;
}